home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Amiga Plus 2002 #11
/
Amiga Plus CD - 2002 - No. 11.iso
/
Online
/
YAPY
/
EdMenu
next >
Wrap
AmigaDOS Script File
|
2002-10-27
|
4KB
|
152 lines
.key FILE,CHOICE
.bra {
.ket }
;
; YAPY v1.3 © 1997 Fredrik Rambris. All rights reserved.
; A script to do the common things with PGP in YAM
;
;
; SelectPGPKey V1.x is © 1997 by J.Kempkes
; Look for PGPgoesMUI!
; Knowing MUI_MCX_Prefs?
;
; This script relies on the two environment-variables PGPPATH and EDITOR
;
; Set PGPPATH to the path where the PGP binary is.
;
; Set the environment-variable EDITOR to the texteditor of your choice.
; Ex. SETENV EDITOR "C:Ed"
; And then COPY ENV:EDITOR ENVARC: to make it permanent
;
;
; *** Put your own KeyID between the "s. Be sure to put 0x in front of it ***
Set keyid ""
;
; DO NOT TOUCH ANYTHING BELOW!
;
LAB begin
IF "$PGPPATH" EQ ""
UNSET choice
SET choice `REQUESTCHOICE TITLE "YAPY v1.3 © 1997 Fredrik Rambris" BODY "You must set the PGPPATH environment-variable!" GADGETS "Help me do it|I'll do it later"`
IF $choice EQ 1
SETENV PGPPATH `REQUESTFILE TITLE "Select drawer where PGP is" DRAWERSONLY NOICONS`
COPY ENV:PGPPATH ENVARC:
SKIP begin BACK
ENDIF
ENDCLI >NIL:
ENDIF
IF "{CHOICE}" EQ ""
UNSET choice
SET choice `REQUESTCHOICE TITLE "YAPY v1.3 © 1997 Fredrik Rambris" BODY "Please select what to do with your mail" GADGETS "Edit|PGP Encrypt|PGP Sign|PGP Sign&Encrypt|Insert your Pub-key|Nothing"`
ELSE
SET choice "{CHOICE}"
ENDIF
IF $choice EQ 0
ENDCLI >NIL:
ENDIF
IF $choice EQ 1
IF "$editor" NOT EQ ""
"$editor" "{file}"
ENDIF
ENDIF
IF $choice EQ 2
SKIP encode
ENDIF
IF $choice EQ 3
SKIP sign
ENDIF
IF $choice EQ 4
SKIP signencode
ENDIF
IF $choice EQ 5
SKIP putkey
ENDIF
IF $choice EQ 6
SKIP decode
ENDIF
ENDCLI >NIL:
LAB encode
path "$pgppath"
pgp -kvf >t:pgpkeys
ECHO >t:edmenu.temp "path *"$pgppath*""
ECHO >>t:edmenu.temp "SelectPGPKey t:pgpkeys"
ECHO >>t:edmenu.temp "pgp -ea *"{file}*" -@t:selected"
ECHO >>t:edmenu.temp "delete *"{file}*" t:selected >NIL:"
ECHO >>t:edmenu.temp "rename *"{file}.asc*" *"{file}*""
ECHO >>t:edmenu.temp "endcli >NIL:"
NEWCLI FROM t:edmenu.temp
ENDCLI >NIL:
LAB sign
path "$pgppath"
pgp -kvf >t:pgpkeys
ECHO >t:edmenu.temp "path *"$pgppath*""
ECHO >>t:edmenu.temp "pgp -sta *"{file}*""
ECHO >>t:edmenu.temp "delete *"{file}*" >NIL:"
ECHO >>t:edmenu.temp "rename *"{file}.asc*" *"{file}*""
ECHO >>t:edmenu.temp "endcli >NIL:"
NEWCLI FROM t:edmenu.temp
ENDCLI >NIL:
LAB signencode
path "$pgppath"
pgp -kvf >t:pgpkeys
ECHO >t:edmenu.temp "path *"$pgppath*""
ECHO >>t:edmenu.temp "SelectPGPKey t:pgpkeys"
ECHO >>t:edmenu.temp "pgp -sea *"{file}*" -@t:selected"
ECHO >>t:edmenu.temp "delete *"{file}*" t:selected >NIL:"
ECHO >>t:edmenu.temp "rename *"{file}.asc*" *"{file}*""
ECHO >>t:edmenu.temp "endcli >NIL:"
NEWCLI FROM t:edmenu.temp
ENDCLI >NIL:
LAB putkey
IF "$keyid" EQ ""
RequestChoice TITLE "YAPY v1.3 © 1997 Fredrik Rambris" BODY "To use this function you must configure YAPY.*NSee the manual how." GADGETS " Ok " >NIL:
ENDCLI >NIL:
ENDIF
IF "`ECHO "$keyid" FIRST 1 LEN 2`" NOT EQ "0x"
RequestChoice TITLE "YAPY v1.3 © 1997 Fredrik Rambris" BODY "The keyid must begin with 0x*NSee the manual how." GADGETS " Ok " >NIL:
quit
;ENDCLI >NIL:
ENDIF
ECHO >t:edmenu.temp "path *"$pgppath*""
ECHO >>t:edmenu.temp "delete t:key.asc FORCE >NIL:"
ECHO >>t:edmenu.temp "pgp -kxa $keyid t:key"
ECHO >>t:edmenu.temp "echo >>*"{file}*" *"*""
ECHO >>t:edmenu.temp "type t:key.asc >>*"{file}*""
ECHO >>t:edmenu.temp "delete t:key.asc FORCE >NIL:"
ECHO >>t:edmenu.temp "endcli >NIL:"
NEWCLI FROM t:edmenu.temp
ENDCLI >NIL:
LAB decode
ECHO >t:edmenu.temp "path *"$pgppath*""
ECHO >>t:edmenu.temp "failat 99999"
ECHO >>t:edmenu.temp "rename *"{file}*" *"{file}.asc*""
ECHO >>t:edmenu.temp "pgp *"{file}.asc*""
ECHO >>t:edmenu.temp "ReplacePGP *"{file}.asc*" *"{file}*""
ECHO >>t:edmenu.temp "Delete *"{file}*" >NIL:"
ECHO >>t:edmenu.temp "rename *"{file}.asc*" *"{file}*""
ECHO >>t:edmenu.temp "endcli >NIL:"
NEWCLI FROM t:edmenu.temp
ENDCLI >NIL: